<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>睿途题库 - 注册</title>
    <script src="assets/js/tailwind.min.js"></script>
    <link href="assets/css/font-awesome.min.css" rel="stylesheet">
    <link href="assets/css/remixicon.min.css" rel="stylesheet">
    
    <!-- Tailwind 配置 -->
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#165DFF',
                        secondary: '#4080FF',
                        accent: '#00B42A',
                        dark: '#1D2129',
                        light: '#F2F3F5',
                        muted: '#86909C'
                    },
                    fontFamily: {
                        inter: ['Inter', 'system-ui', 'sans-serif'],
                    },
                    boxShadow: {
                        'card': '0 10px 30px -5px rgba(0, 0, 0, 0.1)',
                    },
                    animation: {
                        'float': 'float 6s ease-in-out infinite',
                    },
                    keyframes: {
                        float: {
                            '0%, 100%': { transform: 'translateY(0)' },
                            '50%': { transform: 'translateY(-10px)' },
                        }
                    }
                }
            }
        }
    </script>
    
    <!-- 自定义样式 -->
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .bg-pattern {
                background-image: 
                    radial-gradient(circle at 10% 20%, rgba(22, 93, 255, 0.05) 0%, transparent 20%),
                    radial-gradient(circle at 80% 30%, rgba(64, 128, 255, 0.05) 0%, transparent 25%),
                    radial-gradient(circle at 40% 70%, rgba(0, 180, 42, 0.05) 0%, transparent 30%),
                    radial-gradient(circle at 90% 90%, rgba(22, 93, 255, 0.05) 0%, transparent 20%);
            }
            .animate-float {
                animation: float 6s ease-in-out infinite;
            }
            @keyframes float {
                0% { transform: translateY(0px); }
                50% { transform: translateY(-15px); }
                100% { transform: translateY(0px); }
            }
            .education-bg {
                background-image: 
                    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><defs><pattern id="pattern-circles" x="0" y="0" width="50" height="50" patternUnits="userSpaceOnUse" patternContentUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(22, 93, 255, 0.1)"></circle></pattern></defs><rect x="0" y="0" width="100%" height="100%" fill="url(%23pattern-circles)"></rect><path d="M0,150 Q250,250 500,150 T1000,150" stroke="rgba(64, 128, 255, 0.15)" stroke-width="2" fill="none"></path><path d="M0,250 Q250,150 500,250 T1000,250" stroke="rgba(0, 180, 42, 0.1)" stroke-width="2" fill="none"></path><path d="M0,350 Q250,450 500,350 T1000,350" stroke="rgba(22, 93, 255, 0.1)" stroke-width="2" fill="none"></path><circle cx="150" cy="150" r="30" fill="rgba(22, 93, 255, 0.05)"></circle><circle cx="850" cy="250" r="40" fill="rgba(0, 180, 42, 0.05)"></circle><circle cx="450" cy="350" r="25" fill="rgba(64, 128, 255, 0.05)"></circle><g transform="translate(50, 80)"><path d="M0,0 L20,0 L20,30 L0,30 Z M5,5 L15,5 L15,25 L5,25 Z" fill="rgba(22, 93, 255, 0.05)" /></g><g transform="translate(250, 120)"><path d="M5,0 L15,0 L15,30 L5,30 Z M5,15 L20,15 L15,30 L5,30 Z" fill="rgba(0, 180, 42, 0.05)" /></g><g transform="translate(750, 90)"><path d="M0,10 L15,0 L30,10 L15,20 Z M5,12 L15,17 L25,12 Z" fill="rgba(64, 128, 255, 0.05)" /></g><g transform="translate(900, 320)"><circle cx="15" cy="15" r="15" fill="rgba(22, 93, 255, 0.05)" /><path d="M5,15 L25,15 M15,5 L15,25" stroke="rgba(22, 93, 255, 0.1)" stroke-width="2" /></g><g transform="translate(400, 280)"><path d="M0,0 L30,0 L30,20 L20,20 L20,30 L10,30 L10,20 L0,20 Z" fill="rgba(0, 180, 42, 0.05)" /></g><g transform="translate(650, 380)"><path d="M5,0 L25,0 L25,30 L5,30 Z M5,10 L25,10 M5,20 L25,20" fill="none" stroke="rgba(64, 128, 255, 0.05)" stroke-width="2" /></g></svg>');
            }
            .tab-active {
                color: #165DFF;
                border-color: #165DFF;
            }
            .tab-inactive {
                @apply text-muted hover:text-primary border-transparent;
            }
        }
    </style>
</head>
<body class="font-inter bg-gray-50 min-h-screen flex flex-col items-center justify-center education-bg relative pb-20">
    <!-- 背景装饰元素 -->
    <div class="absolute inset-0 overflow-hidden -z-10">
        <div class="absolute top-10 left-10 w-40 h-40 rounded-full bg-primary/10 animate-float">
            <div class="w-full h-full flex items-center justify-center text-primary/20 text-6xl">
                <i class="ri-book-2-line"></i>
            </div>
        </div>
        <div class="absolute bottom-20 right-20 w-60 h-60 rounded-full bg-secondary/10 animate-float" style="animation-delay: -2s">
            <div class="w-full h-full flex items-center justify-center text-secondary/20 text-7xl">
                <i class="ri-graduation-cap-line"></i>
            </div>
        </div>
        <div class="absolute top-1/3 right-1/4 w-32 h-32 rounded-full bg-accent/10 animate-float" style="animation-delay: -4s">
            <div class="w-full h-full flex items-center justify-center text-accent/20 text-5xl">
                <i class="ri-lightbulb-line"></i>
            </div>
        </div>
    </div>

    <div class="mt-20">
        <!-- 注册卡片 -->
        <div class="w-full max-w-md px-6 py-8 bg-white rounded-2xl shadow-card relative overflow-hidden">
            <!-- 顶部装饰条 -->
            <div class="absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-primary to-accent"></div>
            
            <!-- 标题区域 -->
            <div class="text-center mb-6">
                <h1 class="text-[clamp(1.5rem,3vw,2rem)] font-bold text-dark">睿途题库-注册</h1>
                <p class="text-muted mt-2">创建账号，开启学习之旅</p>
            </div>
            
            <!-- 选项卡导航 -->
            <div class="flex border-b mb-6">
                <button id="phoneTab" class="tab-active flex-1 py-2 text-center font-medium border-b-2 border-transparent transition-colors">
                    <i class="ri-smartphone-line mr-1"></i> 手机注册
                </button>
                <button id="emailTab" class="flex-1 py-2 text-center font-medium border-b-2 border-transparent text-muted transition-colors">
                    <i class="ri-mail-line mr-1"></i> 邮箱注册
                </button>
            </div>
            
            <!-- 注册表单 -->
            <form id="registerForm" class="space-y-5">
                <!-- 手机注册表单 -->
                <div id="phoneRegister" class="space-y-5">
                    <!-- 手机号 -->
                    <div class="space-y-2">
                        <label for="phone" class="block text-sm font-medium text-dark">手机号</label>
                        <div class="relative">
                            <span class="absolute inset-y-0 left-0 flex items-center pl-3 text-muted">
                                <i class="ri-smartphone-line"></i>
                            </span>
                            <input type="tel" id="phone" name="phone" 
                                   class="w-full pl-10 pr-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary/30 focus:border-primary transition-all duration-200 outline-none"
                                   placeholder="请输入手机号">
                        </div>
                    </div>
                    
                    <!-- 验证码 -->
                    <div class="space-y-2">
                        <label for="phoneCode" class="block text-sm font-medium text-dark">验证码</label>
                        <div class="flex space-x-3">
                            <div class="relative flex-1">
                                <span class="absolute inset-y-0 left-0 flex items-center pl-3 text-muted">
                                    <i class="ri-shield-line"></i>
                                </span>
                                <input type="text" id="phoneCode" name="phoneCode" 
                                       class="w-full pl-10 pr-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary/30 focus:border-primary transition-all duration-200 outline-none"
                                       placeholder="请输入验证码">
                            </div>
                            <button type="button" id="sendPhoneCode" class="min-w-[120px] py-3 px-4 bg-primary/10 text-primary font-medium rounded-lg hover:bg-primary/20 transition-colors whitespace-nowrap">
                                获取验证码
                            </button>
                        </div>
                    </div>
                </div>
                
                <!-- 邮箱注册表单 -->
                <div id="emailRegister" class="space-y-5 hidden">
                    <!-- 邮箱 -->
                    <div class="space-y-2">
                        <label for="email" class="block text-sm font-medium text-dark">邮箱</label>
                        <div class="relative">
                            <span class="absolute inset-y-0 left-0 flex items-center pl-3 text-muted">
                                <i class="ri-mail-line"></i>
                            </span>
                            <input type="email" id="email" name="email" 
                                   class="w-full pl-10 pr-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary/30 focus:border-primary transition-all duration-200 outline-none"
                                   placeholder="请输入邮箱">
                        </div>
                    </div>
                    
                    <!-- 验证码 -->
                    <div class="space-y-2">
                        <label for="emailCode" class="block text-sm font-medium text-dark">验证码</label>
                        <div class="flex space-x-3">
                            <div class="relative flex-1">
                                <span class="absolute inset-y-0 left-0 flex items-center pl-3 text-muted">
                                    <i class="ri-shield-line"></i>
                                </span>
                                <input type="text" id="emailCode" name="emailCode" 
                                       class="w-full pl-10 pr-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary/30 focus:border-primary transition-all duration-200 outline-none"
                                       placeholder="请输入验证码">
                            </div>
                            <button type="button" id="sendEmailCode" class="min-w-[120px] py-3 px-4 bg-primary/10 text-primary font-medium rounded-lg hover:bg-primary/20 transition-colors whitespace-nowrap">
                                获取验证码
                            </button>
                        </div>
                    </div>
                </div>
                
                <!-- 同意条款 -->
                <div class="flex items-start">
                    <div class="flex items-center h-5">
                        <input id="terms" name="terms" type="checkbox" class="w-4 h-4 border border-gray-300 rounded focus:ring-primary/30 focus:ring-offset-0 text-primary">
                    </div>
                    <div class="ml-3 text-sm">
                        <label for="terms" class="text-muted">我已阅读并同意 <a href="#" class="text-primary hover:underline">用户协议</a> 和 <a href="#" class="text-primary hover:underline">隐私政策</a></label>
                    </div>
                </div>
                
                <!-- 注册按钮 -->
                <button type="submit" class="w-full py-3 bg-primary hover:bg-primary/90 text-white font-medium rounded-lg transition-all duration-200 transform hover:-translate-y-1 hover:shadow-lg flex items-center justify-center">
                    <span>立即注册</span>
                    <i class="ri-user-add-line ml-2"></i>
                </button>
                
                <!-- 已有账号 -->
                <div class="text-center text-sm">
                    <span class="text-muted">已有账号？</span>
                    <a href="login.html" class="text-primary hover:underline">立即登录</a>
                </div>
            </form>
        </div>
    </div>

    <!-- 页脚 -->
    <div class="absolute bottom-6 text-center text-sm text-muted">
        <p>© 2023 睿途题库. 保留所有权利.</p>
    </div>

    <!-- JavaScript -->
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // 获取DOM元素
            const phoneTab = document.getElementById('phoneTab');
            const emailTab = document.getElementById('emailTab');
            const phoneRegister = document.getElementById('phoneRegister');
            const emailRegister = document.getElementById('emailRegister');
            const sendPhoneCode = document.getElementById('sendPhoneCode');
            const sendEmailCode = document.getElementById('sendEmailCode');
            
            // 切换注册方式
            phoneTab.addEventListener('click', function() {
                this.classList.add('tab-active');
                this.classList.remove('tab-inactive');
                emailTab.classList.remove('tab-active');
                emailTab.classList.add('tab-inactive');
                phoneRegister.classList.remove('hidden');
                emailRegister.classList.add('hidden');
            });
            
            emailTab.addEventListener('click', function() {
                this.classList.add('tab-active');
                this.classList.remove('tab-inactive');
                phoneTab.classList.remove('tab-active');
                phoneTab.classList.add('tab-inactive');
                emailRegister.classList.remove('hidden');
                phoneRegister.classList.add('hidden');
            });
            
            // 发送验证码倒计时
            function startCountdown(button) {
                let countdown = 60;
                button.disabled = true;
                button.classList.add('opacity-50', 'cursor-not-allowed');
                button.textContent = countdown + 's后重新发送';
                
                const timer = setInterval(() => {
                    countdown--;
                    button.textContent = countdown + 's后重新发送';
                    
                    if (countdown <= 0) {
                        clearInterval(timer);
                        button.disabled = false;
                        button.classList.remove('opacity-50', 'cursor-not-allowed');
                        button.textContent = '获取验证码';
                    }
                }, 1000);
            }
            
            // 发送手机验证码
            sendPhoneCode.addEventListener('click', function() {
                if (!this.disabled) {
                    startCountdown(this);
                }
            });
            
            // 发送邮箱验证码
            sendEmailCode.addEventListener('click', function() {
                if (!this.disabled) {
                    startCountdown(this);
                }
            });
        });
    </script>
</body>
</html>
    